<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <input id="c-shop_id" data-rule="required" class="form-control" name="row[shop_id]" type="hidden" value="{$row.shop_id}">
    <div class="panel panel-default panel-intro">
        <div class="panel-heading">
            {:build_heading()}
            <ul class="nav nav-tabs">
                <li class="active"><a href="#Tab1" data-toggle="tab">基本信息</a></li>
                <li><a href="#Tab3" data-toggle="tab">商品相册</a></li>
            </ul>
        </div>
        <div class="panel-body">
            <div id="myTabContent" class="tab-content">
                <div class="tab-pane fade active in" id="Tab1">

                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Goodsname')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input id="c-goodsname" data-rule="required" class="form-control" name="row[goodsname]" type="text" value="{$row.goodsname}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Goodstype')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <div class="radio">
                                {foreach name="goodstypeList" item="vo"}
                                <label for="row[goodstype]-{$key}"><input id="row[goodstype]-{$key}" name="row[goodstype]" type="radio" value="{$key}" {in name="key" value="$row.goodstype"}checked{/in} disabled /> {$vo}</label>
                                {/foreach}
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Goodssn')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input id="c-goodssn" data-rule="required" class="form-control" name="row[goodssn]" disabled type="text" value="{$row.goodssn}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Productno')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input id="c-productno" data-rule="required" class="form-control" name="row[productno]" disabled type="text" value="{$row.productno}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Goodsimg')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <div class="input-group">
                                <input id="c-goodsimg" data-rule="required" class="form-control" size="50" name="row[goodsimg]" type="text" value="{$row.goodsimg}">
                                <div class="input-group-addon no-border no-padding">
                                    <span><button type="button" id="plupload-goodsimg" class="btn btn-danger plupload" data-input-id="c-goodsimg" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-goodsimg"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                                    <span><button type="button" id="fachoose-goodsimg" class="btn btn-primary fachoose" data-input-id="c-goodsimg" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                                </div>
                                <span class="msg-box n-right" for="c-goodsimg"></span>
                            </div>
                            <ul class="row list-inline plupload-preview" id="p-goodsimg"></ul>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Marketprice')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input id="c-marketprice" data-rule="required" class="form-control" step="0.01" name="row[marketprice]" type="number" value="{$row.marketprice}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Shopprice')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input id="c-shopprice" data-rule="required" class="form-control" step="0.01" name="row[shopprice]" type="number" value="{$row.shopprice}">
                        </div>
                    </div>
                    <div class="form-group gtf gtf-0">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Warnstock')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input id="c-warnstock" data-rule="required" class="form-control" name="row[warnstock]" type="number" value="{$row.warnstock}">
                        </div>
                    </div>
                    <div class="form-group gtf gtf-0">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Goodsstock')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input id="c-goodsstock" data-rule="required" class="form-control" name="row[goodsstock]" type="number" value="{$row.goodsstock}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Goodsunit')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input id="c-goodsunit" data-rule="required" class="form-control" name="row[goodsunit]" type="text" value="{$row.goodsunit}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Seokeywords')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input id="c-seokeywords" class="form-control" name="row[seokeywords]" type="text" value="{$row.seokeywords}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Goodstips')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <textarea id="c-goodstips" class="form-control " rows="5" name="row[goodstips]" cols="50">{$row.goodstips}</textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Bestis')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input  id="c-bestis" name="row[bestis]" type="hidden" value="{$row.bestis}">
                            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-bestis" data-yes="1" data-no="0" >
                                <i class="fa fa-toggle-on text-success {eq name="$row.bestis" value="0"}fa-flip-horizontal text-gray{/eq} fa-2x"></i>
                            </a>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Hotis')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input  id="c-hotis" name="row[hotis]" type="hidden" value="{$row.hotis}">
                            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-hotis" data-yes="1" data-no="0" >
                                <i class="fa fa-toggle-on text-success {eq name="$row.hotis" value="0"}fa-flip-horizontal text-gray{/eq} fa-2x"></i>
                            </a>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Newis')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input  id="c-newis" name="row[newis]" type="hidden" value="{$row.newis}">
                            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-newis" data-yes="1" data-no="0" >
                                <i class="fa fa-toggle-on text-success {eq name="$row.newis" value="0"}fa-flip-horizontal text-gray{/eq} fa-2x"></i>
                            </a>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Recomis')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input  id="c-recomis" name="row[recomis]" type="hidden" value="{$row.recomis}">
                            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-recomis" data-yes="1" data-no="0" >
                                <i class="fa fa-toggle-on text-success {eq name="$row.recomis" value="0"}fa-flip-horizontal text-gray{/eq} fa-2x"></i>
                            </a>
                        </div>
                    </div>
                    <div class="form-group gtf gtf-0">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Freighttype')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            {:build_radios('row[freighttype]', $freighttypeList, $row['freighttype'])}
                        </div>
                    </div>
                    <div class="form-group tf tf-2 tf-4">
                        <label class="control-label col-xs-12 col-sm-2">{:__('weight')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input id="c-weight" class="form-control" name="row[weight]" type="text" value="{$row.weight}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Goodscat_ids')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input value="{$row.goodscat_ids}" id="c-goodscat_ids" name="row[goodscat_ids]" type="hidden" >
                            <div class="col-xs-4">
                                <input name="row[category1]" value="{$row.goodscat_ids[0]}" data-params='{"custom[pid]":"0"}' id="c-category1" data-source="/admin/mall/goods/cat/selectpage" class="form-control selectpage" placeholder="{:__('Category L1')}" type="text">
                            </div>
                            <div class="col-xs-4">
                                <input name="row[category2]" value="{$row.goodscat_ids[1]}" id="c-category2"  data-source="/admin/mall/goods/cat/selectpage" class="form-control selectpage" placeholder="{:__('Category L2')}" type="text">
                            </div>
                            <div class="col-xs-4">
                                <input name="row[category3]" value="{$row.goodscat_ids[2]}" id="c-category3"  data-source="/admin/mall/goods/cat/selectpage" class="form-control selectpage" placeholder="{:__('Category L3')}" type="text">
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Shopcat_ids')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input value="{$row.shopcat_ids}" id="c-shopcat_ids" name="row[shopcat_ids]" type="hidden">
                            <div class="col-xs-4">
                                <input name="row[shopcat1]" value="{$row.shopcat_ids[0]}" data-params='{"custom[pid]":"0"}' id="c-shopcat1" data-source="/admin/mall/shop/cat/selectpage" class="form-control selectpage" placeholder="{:__('Category L1')}" type="text">
                            </div>
                            <div class="col-xs-4">
                                <input name="row[shopcat2]" value="{$row.shopcat_ids[1]}" id="c-shopcat2"  data-source="/admin/mall/shop/cat/selectpage" class="form-control selectpage" placeholder="{:__('Category L2')}" type="text">
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Brand_id')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input id="c-brand_id" name="row[brand_id]" value="{$row.brand_id}" data-source="mall/goods/brands/selectpage" class="form-control selectpage"  placeholder="{:__('Select')}{:__('Brand')}" type="text">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Goodsdesc')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <textarea id="c-goodsdesc" data-rule="required" class="form-control editor" rows="5" name="row[goodsdesc]" cols="50">{$row.goodsdesc|htmlentities}</textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <div class="radio">
                                {foreach name="statusList" item="vo"}
                                <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
                                {/foreach}
                            </div>
                        </div>
                    </div>
                    <div class="form-group stf stf-illegal">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Illegalremarks')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <textarea id="c-illegalremarks" class="form-control " rows="3" name="row[illegalremarks]" cols="50">{$row.illegalremarks}</textarea>
                        </div>
                    </div>
                    <div class="form-group stf stf-sale">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Goodsstatus')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input  id="c-goodsstatus" name="row[goodsstatus]" type="hidden" value="{$row.goodsstatus}">
                            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-goodsstatus" data-yes="1" data-no="0" >
                                <i class="fa fa-toggle-on text-success {eq name="$row.goodsstatus" value="0"}fa-flip-horizontal text-gray{/eq} fa-2x"></i>
                            </a>
                        </div>
                    </div>
                </div>
                <div class="tab-pane fade" id="Tab3">
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Gallery')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <div class="input-group">
                                <input id="c-gallery" class="form-control" size="50" name="row[gallery]" type="text" value="{$row.gallery}">
                                <div class="input-group-addon no-border no-padding">
                                    <span><button type="button" id="plupload-gallery" class="btn btn-danger plupload" data-input-id="c-gallery" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-gallery"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                                    <span><button type="button" id="fachoose-gallery" class="btn btn-primary fachoose" data-input-id="c-gallery" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                                </div>
                                <span class="msg-box n-right"></span>
                            </div>
                            <ul class="row list-inline plupload-preview" id="p-gallery"></ul>
                        </div>
                    </div>
                </div>
            </div>

            <div class="form-group layer-footer">
                <label class="control-label col-xs-12 col-sm-2"></label>
                <div class="col-xs-12 col-sm-8">
                    <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
                    <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
                </div>
            </div>

        </div>
    </div>
</form>
